﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;
using Core.Base;
using ERP.BusinessEntities;

namespace MainApp.Modules.Shipment
{
    public class ShipmentModule: BaseModule
    {
        public ShipmentModule()
        {
            this.Name = "Shipment";
            entity = new ShipmentEntity();
            Init();
        }



        public void ShowShipmentItemDetail()
        {
            Dictionary<String, ICShipmentItemsInfo> dicShipmentItemConsolidates = new Dictionary<string, ICShipmentItemsInfo>();
            foreach (ICShipmentItemsInfo ShipmentItem in ((ShipmentEntity)entity).lstICShipmentItems)
            {
                String strKey = String.Format(@"{0}_{1}", ShipmentItem.FK_ICProducts_ID, ShipmentItem.FK_ICStocks_ID);
                if (dicShipmentItemConsolidates.ContainsKey(strKey) == false)
                {
                    ICShipmentItemsInfo ShipmentItemConsolidate = new ICShipmentItemsInfo();
                    ShipmentItemConsolidate.FK_ICProducts_ID = ShipmentItem.FK_ICProducts_ID;
                    ShipmentItemConsolidate.FK_ICStocks_ID = ShipmentItem.FK_ICStocks_ID;
                }
            }


            if (dicScreens.ContainsKey("ItemDetailScreen"))
                dicScreens["ItemDetailScreen"].Show();
        }
    }
}
